﻿<Page
    x:Name="devpage"
    x:Class="TISensorTag.BLEDevices"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:TISensorTag"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Grid>
        <StackPanel>
            <TextBlock Text="Select paired 'TI SensorTag':" Style="{StaticResource TitleTextBlockStyle}" Margin="10,0,0,10"/>
            <TextBlock FontSize="14" TextWrapping="Wrap"  Text="If device is not listed: 1) Enable device - broadcasting by pressing the button on the device 2) Enable Windows Phone bluetooth from 'Settings -> Bluetooth' 3) Pair device with Windows Phone from 'Settings -> Bluetooth'" Margin="10,0,0,10"/>
            <ListBox x:Name="deviceListBox" FontSize="24" Margin="0,0,0,10" ItemsSource="{Binding bleDevices, ElementName=devpage}" SelectionChanged="deviceListBox_SelectionChanged" />
        </StackPanel>
    </Grid>

    <Page.BottomAppBar>
        <CommandBar>
            <AppBarButton x:Uid="btnRefreshDevList" x:Name="btnRefreshDevList" Label="Refresh" Icon="Refresh" Click="btnRefreshDevList_Click" />
        </CommandBar>
    </Page.BottomAppBar>
</Page>
